import http from "@/api";

import { CompanyClientEntity } from "@/biz/interface/CompanyType";

import { ModuleMainUrl, ModuleCommonUrl } from "..";

const moduleUrl = ModuleMainUrl;

const moduleComUrl = ModuleCommonUrl;

// * 保存招工企业接口
export const saveCompanyApi = (company: CompanyClientEntity) => {
  return http.post(moduleUrl + `/cpy/infosave`, company);
};

// * 详情招工企业接口
export const getCompanyInfoApi = (params: {}) => {
  return http.post<CompanyClientEntity>(moduleUrl + `/cpy/infoinfo`, params);
};

// * 识别企业营业执照
export const handleOcrCompanyLicenseApi = (parms: { imgurl: string }) => {
  return http.post(moduleComUrl + `/comocrapi/bzlicense`, parms);
};

// * 保存企业营业执照
export const saveOcrCompanyLicenseApi = (parms: { companyId: string; companyImg: string }) => {
  return http.post(moduleUrl + `/cpy/savebizcode`, parms);
};
